class Music < ApplicationRecord
  validates :title, presence: true, length: {in: 1..100}
  validates :length, presence: true, numericality: {only_integer:true, greater_than: 1,less_than: 1200}
  validates :album, length: {maximum: 100}
  belongs_to :album
  has_and_belongs_to_many :singers
end

